<?php // RELATED WEBINARS
	$test = "";
	$posttags = get_the_tags();
	if ($posttags) {
		foreach($posttags as $tag) {
			$test .= ',' . $tag->name; 
		}
	} ?>
    
<?php $test = substr($test, 1); // remove first comma
		query_posts('tag=' .$test . '&showposts=-1&cat=120');
		if (have_posts()) { ?>
			<h4>Related Webinars</h4>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; wp_reset_query(); ?>
			</ul>	
        <?php } ?>

<?php // RELATED PRESS RELEASES
	$test = "";
	$posttags = get_the_tags();
	if ($posttags) {
		foreach($posttags as $tag) {
			$test .= ',' . $tag->name; 
		}
	} ?>
    
<?php $test = substr($test, 1); // remove first comma
		query_posts('tag=' .$test . '&showposts=-1&cat=11');
		if (have_posts()) { ?>
			<h4>Related Press Releases</h4>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; wp_reset_query(); ?>
			</ul>	
        <?php } ?>

<?php // RELATED TECH TIPS
	$test = "";
	$posttags = get_the_tags();
	if ($posttags) {
		foreach($posttags as $tag) {
			$test .= ',' . $tag->name; 
		}
	} ?>

<?php $test = substr($test, 1); // remove first comma
		query_posts('tag=' .$test . '&showposts=-1&cat=4');
		if (have_posts()) { ?>
			<h4>Related Technical Tips &amp; FAQs</h4>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; wp_reset_query(); ?>
			</ul>	
        <?php } ?>

<?php // RELATED VIDEOS
	$test = "";
	$posttags = get_the_tags();
	if ($posttags) {
		foreach($posttags as $tag) {
			$test .= ',' . $tag->name; 
		}
	} ?>
	
<?php $test = substr($test, 1); // remove first comma
		query_posts('tag=' .$test . '&showposts=-1&cat=13');
		if (have_posts()) { ?>
			<h4>Related Videos</h4>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; wp_reset_query(); ?>
			</ul>	
        <?php } ?>

<?php // RELATED REFERENCE PROJECTS
	$test = "";
	$posttags = get_the_tags();
	if ($posttags) {
		foreach($posttags as $tag) {
			$test .= ',' . $tag->name; 
		}
	} ?>
	
<?php $test = substr($test, 1); // remove first comma
		query_posts('tag=' .$test . '&showposts=-1&cat=10');
		if (have_posts()) { ?>
			<h4>Related Reference Projects</h4>
			<ul>
			<?php while (have_posts()) : the_post(); ?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; wp_reset_query(); ?>
			</ul>	
        <?php } ?>
